package com.swlz.service;

import com.swlz.entity.Department;
import com.swlz.exception.CodeException;
import com.swlz.vo.PageVO;

/**
 * <pre>
 * 业务逻辑接口
 * 系统部门
 * ClassName : com.swlz.service.DepartmentService
 * Author : swlz
 * E-Mail : 2233875735@qq.com
 * Date : 2020-06-26 18:19:40
 * Version : 1.0
 * Copyright 2020 swlz.top Inc. All rights reserved. 
 * Warning: this content is only for internal circulation of the company. It is forbidden to divulge it or use it for other commercial purposes
 * </pre>
 **/
public interface DepartmentService {


	/**
	 * 添加一个新的系统部门
	 * @param department
	 * @return
	 * @throws CodeException 500:添加系统部门错误
	 */
	int add(Department department)throws CodeException;
	
	/**
	 * 根据系统部门编号修改系统部门
	 * @param department
	 * @return
	 * @throws CodeException 501:修改系统部门错误
	 */
	int update(Department department)throws CodeException;
	
	
	/**
	 * 根据系统部门编号删除系统部门
	 * @param deptId - 系统部门编号
	 * @return
	 * @throws CodeException 502:删除系统部门错误
	 */
	int delete(Long deptId)throws CodeException;
	
	/**
	 * 根据系统部门编号获取系统部门对象
	 * @param deptId - 系统部门编号
	 * @return
	 * @throws CodeException 503:获取系统部门失败
	 */
	Department get(Long deptId)throws CodeException;
	
	/**
	 * 根据模型查找匹配的数据，并进行分页
	 * @param department - 匹配数据模型
	 * @param current - 当前页面
	 * @param rowMax - 每页最大值
	 * @return - 分页结果
	 * @throws CodeException 504:获取系统部门分页数据失败
	 */
	PageVO<Department> page(Department department,Integer current,Integer rowMax)throws CodeException;

 
}
